package com.sfjswl.fp.core.leaf.pack;

import com.sfjswl.fp.core.context.RuleContext;
import com.sfjswl.fp.core.context.RulePack;
import com.sfjswl.fp.core.leaf.base.BaseLeafResult;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public abstract class BaseLeafPackResult extends BaseLeafResult {

  @Override
  protected boolean doResult(RuleContext ctx) {
    return doPackResult(ctx.getPack());
  }

  protected abstract boolean doPackResult(RulePack pack);
}
